<?php

Class Phpsa_View_Helper_Skin extends Zend_View_Helper_Abstract {

	public function skin($skin){
		$skinData = new Zend_Config_Xml("./skins/" . $skin . "/skin.xml");
		if(is_object($skinData->stylesheets)){
			if(is_object($skinData->stylesheets->stylesheet)){
				foreach($skinData->stylesheets->stylesheet->toArray as $css){
					$this->view->headLink()->appendStylesheet('/skins/' . $skin . '/css/' . $css);
				}
			}else{
				$this->view->headLink()->appendStylesheet('/skins/' . $skin . '/css/' . $skinData->stylesheets->stylesheet);
			}
		}
	
	}

}
